package org.fuys.coder.domain.user.repository;


import org.fuys.coder.common.entity.Pair;
import org.fuys.coder.domain.auth.model.vo.UserVo;
import org.fuys.coder.common.entity.PageDTO;
import org.fuys.coder.domain.user.model.req.repo.UserInfoSelectReq;
import org.fuys.coder.domain.user.model.req.repo.UserInfoUpdateReq;
import org.fuys.coder.domain.user.model.vo.operation.UserStopVO;
import org.fuys.coder.domain.user.model.vo.repo.AuthorVO;

import java.util.Date;
import java.util.List;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.user.repository
 * @className: IUserRepository
 * @author: WangJing
 * @description: 用户仓储服务
 * @date: 2024/6/30 16:31
 * @version: 1.0
 */
public interface IUserRepository {
    public void updateUserPoint(Integer userId, Integer value);
    public int getUserPoint(Integer userId);

    boolean updateUserInfo(UserInfoUpdateReq req, Integer userId);

    UserVo getUserInfo(Integer userId);

    Integer getUserStatus(Integer userId);

    List<Integer> getUserFollowers(Integer userId,Integer type);

    List<Pair<Integer,Integer>> getUserNoticed(Integer userId);

    void updateUserNoticedAuthor(List<Pair<Integer, Integer>> collect, Integer userId);

    List<AuthorVO> getUserNoticedVos(Integer userId, PageDTO pageDTO);

    List<AuthorVO> getUserFollowerVos(Integer userId,Integer type,PageDTO pageDTO);

    List<UserVo> getUserInfoByCondition(UserInfoSelectReq selectReq);

    boolean freezeUser(Integer userId, Date date,String email);

    boolean updateUserStatus(Integer userId,Integer status);

    void unFreezeUser(Integer userId,String email);

    Pair<List<AuthorVO>,Long> getAuthorVOByName(Integer pageNum, Integer curPage, String keywords);

    String getUserNameById(Integer fromId);

    void updateUserFollower(Integer authorId, int num);

    UserStopVO getFreezeUser(String email);
}
